<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
<!doctype html>
<html>
<head>
	<title>道路救援查询</title>
    <link rel="stylesheet" href='<c:url value="/resources/pms/common.css" />' />
    <link rel="stylesheet" href='<c:url value="/resources/pms/style.css" />' />
    <script src='<c:url value="/resources/jsLib/jquery-1.11.0.min.js" />'></script>
    <script src='<c:url value="/resources/pms/js/script.js" />'></script>
    <script type="text/javascript" src='<c:url value="/resources/jsLib/layer2.3/layer.js" />' ></script>
    <script src='<c:url value="/resources/jsLib/artTemplate-3.0.1/dist/template.js" />' ></script>
    <script src='<c:url value="/resources/pms/js/project.js" />'></script>
	<script type="text/javascript">
	    var toolStyle = "", g_limit = 10;

		var pageListUrl = "<c:url value="/rss/list" />";
/* 		var loadByIdUrl = "<c:url value="/announcement/load/" />";
		var saveUrl = "<c:url value="/announcement/save" />";
		var delByIdUrl = "<c:url value="/announcement/del/" />"; */

		var detailTbodyTemplateID = "detailTbodyTemplate";
		var detailTbodyID = "detailTbody";
		var pageToolID = "pageTool";

		var editTemplateID = "edit-template";
		var editFormID = "nsForm";
		var searchFormID = "searchForm";

		function reset() {
			$("#mobilePhone").val("");
			$("#licensePlate").val("");
			$("#cardNum").val("");
		}
		function validation() {
			var ph = $("#mobilePhone").val();
			var pl = $("#licensePlate").val();
			var cn = $("#cardNum").val();
/* 			console.log(ph);
			console.log(typeof ph);
			console.log(ph == '');
			console.log(typeof ph == 'undefined')	 */

			if((ph == '' || typeof ph == 'undefined') && (pl == '' || typeof pl == 'undifined') && (cn == '' || typeof cn == 'undifined')) {
				alert('请输入查询条件');
			} else {
				toPage();
			}
		}
	</script>

</head>


<body  class="list-body">

<div class="content">
	<div class="title fix">
		<h3 class="b f14 fl">道路救援查询</h3>
	</div>

	<div class="main">
		<div class="inquiry" style="text-align: center;">
			<form id="searchForm" class="form-box form-group group">
				<input type="hidden" name="currentPage" value="1">
				<input type="hidden" name="toolStyle" value="pms">
				<input type="hidden" name="limit" value="10">
				<!-- <input type="hidden" name="method" value="toPage"> -->
				<%-- <input type="hidden" name="dealerNum" value="${dealerNum}"> --%>
				<label for="mobilePhone">手机：</label>
				<input type="text" name="mobilePhone" id="mobilePhone">
				<label for="licensePlate">车牌：</label>
				<input type="text" name="licensePlate" id="licensePlate">
				<label for="cardNum">卡号：</label>
				<input type="text" name="cardNum" id="cardNum">
			</form>
			<div class="btns form-box form-group " >
				<button class="green" onclick="validation()">查询</button>
				<button class="green" onclick="reset()">重置</button>
			</div>
		</div>
		<div class="table">
			<table width="100%">
				<thead>
				<tr>
					<th width="90">手机</th>
					<th width="120">姓名</th>
					<th width="70">车牌</th>
					<th width="90">卡号</th>
					<th width="80">购买日期</th>
					<th width="80">激活日期</th>
					<th width="80">过期日期</th>
					<th width="">会员福利</th>
				</tr>
				</thead>
				<tbody id="detailTbody" class="detailTr"></tbody>
			</table>
		</div>

		<div class="pageTool" id="pageTool"></div>
	</div>
</div>
<script id="detailTbodyTemplate" type="text/html">
	{{each items as v i}}
	<tr>
		<td>{{v.mobilePhone}}</td>
		<td>{{v.memberName}}</td>
		<td>{{v.licensePlate}}</td>
		<td>{{v.cardNum}}</td>
		<td>{{v.purchaseDate}}</td>
		<td>{{v.activeDate}}</td>
		<td>{{v.expireDate}}</td>
		<td>{{v.memberBenfit}}</td>
	</tr>
	{{/each}}
	{{if items.length == 0}}
	<tr>
		<td colspan="8" class="none-data-tip">没有相关数据</td>
	</tr>
	{{/if}}
</script>
</body>
</html>




